﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SDoFight extends IMessageBase
    {
        public var attackId:int;
        public var skillId:int;
        public var fromEntity:SEntityId;
        public var entity:SEntityId;
        public var propertyUpdates:Array;
        public const _type:int = 15953;
        public static var _regist:SDoFight = new SDoFight(true);

        public function SDoFight(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SDoFight();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeShort(this.attackId);
            param1.writeInt(this.skillId);
            this.fromEntity.__write(param1);
            this.entity.__write(param1);
            SeqAttributeUpdateHelper.write(param1, this.propertyUpdates);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.attackId = param1.readShort();
            this.skillId = param1.readInt();
            this.fromEntity = new SEntityId();
            this.fromEntity.__read(param1);
            this.entity = new SEntityId();
            this.entity.__read(param1);
            this.propertyUpdates = SeqAttributeUpdateHelper.read(param1);
            return;
        }// end function

    }
}
